package cn.lsnu.common.dict.service;

import cn.lsnu.common.dict.entity.Dict;
import cn.lsnu.common.dict.mapper.DictMapper;
import cn.lsnu.common.interfacetools.interfaceentity.Page;
import cn.lsnu.common.interfacetools.interfaceservice.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictService extends BaseService<Dict, DictMapper> {
    @Autowired
    private DictMapper dictMapper;


    public List<Dict> showDict() {
        return  dictMapper.showDict();
    }

    public int saveDict(Dict dict) {
        return dictMapper.saveDict(dict);
    }

    public int deleteDictById(String dictId) {
        return  dictMapper.delectDictById(dictId);
    }

    public List<Dict> findIdentify(Dict entity)throws Exception{
       return   dictMapper.findIdentify(entity);
    }

    @Override
    public void save(Dict entity) throws Exception {
        super.save(entity);
    }

    @Override
    public Dict get(String key) throws Exception {
        return super.get(key);
    }

    @Override
    public Dict getEntity(Dict entity) throws Exception {
        return super.getEntity(entity);
    }

    @Override
    public List<Dict> findList(Dict entity) throws Exception {
        return super.findList(entity);
    }

    @Override
    public Page<Dict> findPage(Dict entity) throws Exception {
        return super.findPage(entity);
    }

    @Override
    public void delete(Dict entity) throws Exception {
        super.delete(entity);
    }

    @Override
    public void update(Dict entity) throws Exception {
        super.update(entity);
    }
}
